New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gaussian filter truncation #239
Conversation
This change gives the user control over the size at which the Gaussian filter is truncated, with default behavior to truncate at 4 standard deviations (the previous fixed value).
…gradient_magnitude() to gaussian_filter() This change allows control over the truncation radius of the gaussian filter used in gaussian_laplace() and gaussian_gradient_magnitude().
roderikk's original patch used But I don't like Perhaps the truncation amount should be specified in pixels. Also, should it be controllable in each dimension separately in |
Anyone want to have a look at this PR this week? Branching 0.12.x this weekend. |
Hi, I contributed the original bug in Trac. How can we get this pulled into main? I think that the truncation as a multiple of For me there is no need to to do a different value in each direction as that would only lead to very weird aliasing results. |
@roderikk: I'll take a look at this today.. I've been working on an enhancement for |
That sounds interesting. If you have some code to be tested let me know. |
@thouis: This looks like a good change. I prefer your 'truncate' over the original 'flen', and I don't have any better suggestions. (Anyone else have an opinion?) I like that you've allowed I've made a pull request on your repo with some changes to the test: thouis#1 |
Continued in gh-2767 |
I realize this is closed, but I've been thinking about a related issue: as sigma goes to zero, the default behavior is ugly: when s goes below 0.25, gaussian_filter suddenly does nothing. Since performance isn't really an issue with a kernel size of three pixels, I would prefer that the kernel not become a delta function until sigma is exactly zero. Thoughts? |
@BenFrantzDale: please open a new issue, thanks. |
These changes add control over the radius of truncation of the Gaussian filters in scipy.ndimage, and add the ability to pass keyword arguments through gaussian_laplace()/gaussian_gradient_magnitude() to gaussian_filter().
This is an expanded form of roderikk's patch from this ticket:
http://projects.scipy.org/scipy/ticket/1660